package com.taglab.chic.atom;

import java.io.Serializable;

/**
 * @author Markus Kobler
 */
public class Link implements Serializable {

  private static final long serialVersionUID = 6321271619494607000L;  

  // required
  private String href;

  // optional
  private String rel;
  private String type;
  private String hreflang;
  private String title;
  private long length;


  public Link(String href) {
    if( href == null ) throw new IllegalArgumentException("href cannot be null");
    this.href = href;
  }

  public Link(String href, String rel) {
    this(href);
    this.rel = rel;
  }

  public Link(String href, String rel, String type) {
    this(href);
    this.rel = rel;
    this.type = type;
  }

  public String getHref() {
    return href;
  }

  public String getRel() {
    return rel;
  }

  public void setRel(String rel) {
    this.rel = rel;
  }

  public String getType() {
    return type;
  }

  public void setType(String type) {
    this.type = type;
  }

  public String getHreflang() {
    return hreflang;
  }

  public void setHreflang(String hreflang) {
    this.hreflang = hreflang;
  }

  public String getTitle() {
    return title;
  }

  public void setTitle(String title) {
    this.title = title;
  }

  public long getLength() {
    return length;
  }

  public void setLength(long length) {
    this.length = length;
  }
  
}
